function getAllBindingInfo(name, scope) {
    let pathList = [];
    // 查看引用
    const bindings = scope.getBinding(name);
    if (!bindings) {
        return pathList;
    }
    for (let referPath of bindings.referencePaths) {
        // 获取父节点
        let parentPath = referPath.parentPath
        // 判断类型.
        if (parentPath.isVariableDeclarator()) {
            // 获取变量名称
            let {node, scope} = parentPath;
            let varName = node.id.name;
            pathList = [].concat(pathList, getAllBindingInfo(varName, scope));
            // 删除掉这些节点.
            parentPath.remove()
        } else {
            pathList.push(parentPath)

        }

    }
    // console.log(name,pathList)
    return pathList;


}
